package br.com.cast.scc.service;

import java.util.Iterator;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import br.com.cast.scc.dao.VeiculoDao;
import br.com.cast.scc.filtros.FiltroPesquisaVeiculos;
import br.com.cast.scc.model.Veiculo;

@Component
public class VeiculoServiceImpl implements VeiculoService {
	
	@Autowired
	private VeiculoDao veiculoDao;
	
	@Override
	public Iterator<? extends Veiculo> consultaPaginada(long inicio, long total, 
			FiltroPesquisaVeiculos filtro) {
		return veiculoDao.consultaPaginada(inicio, total, filtro);
	}

	@Override
	public long total() {
		return veiculoDao.total(Veiculo.class);
	}

}
